package com.basic.bio.threadpool;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;

/**
 * @Description:
 * @Date: 2024-03-28 14:18
 * @Author: wz
 **/
public class Client {
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("127.0.0.1", 9090);
            OutputStream os = socket.getOutputStream();
            Scanner scanner = new Scanner(System.in);
            while (true){
                String msg = scanner.next();
                os.write(msg.getBytes());
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
